/**
 * 
 */
package cn.tonyqiu.wonuly.client.gui;

import com.google.gwt.user.client.Window;
import com.google.gwt.user.client.ui.ClickListener;
import com.google.gwt.user.client.ui.HTML;
import com.google.gwt.user.client.ui.Label;
import com.google.gwt.user.client.ui.VerticalPanel;
import com.google.gwt.user.client.ui.Widget;

/**
 * @author <a href="mailto:tony.qiu.smart@gmail.com">Tony Qiu</a>
 *
 */
public class BillOperations extends com.google.gwt.user.client.ui.Composite implements ClickListener{
	
	private HTML addLink = new HTML("<a href=javascript:;>"+Wonuly.constants.billOperationAdd()+"</a>");
	private HTML showLink = new HTML("<a href=javascript:;>"+Wonuly.constants.billOperationShow()+"</a>");

	public BillOperations() {
		VerticalPanel outer = new VerticalPanel();
		addLink.addClickListener(this);
		showLink.addClickListener(this);
		outer.add(addLink);
		outer.add(showLink);
		initWidget(outer);
	}

	/* (non-Javadoc)
	 * @see com.google.gwt.user.client.ui.ClickListener#onClick(com.google.gwt.user.client.ui.Widget)
	 */
	
	public void onClick(Widget w) {
		if(w == addLink) {
			Wonuly.get().showAddPanel();
		}else if(w == showLink) {
			Wonuly.get().showContentList();
		}
		
	}
}
